package com.wc.AlgoOJ_train.train1.c3.A203;

import java.util.Scanner;

/**
 * @Author congege
 * @Description
 * 复习时间
 * http://43.138.190.70:8888/p/A203
 * @Date Created in 2024/1/3-13:19
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0){
            int n = sc.nextInt();
            // 最多复习m门，我们把最小的弄到第一门就结束就好了
            int m = sc.nextInt();
            int min = 101;
            while (n-->0){
                min = Math.min(min,sc.nextInt());
            }
            System.out.println((int)Math.pow(100-min,2));
        }
    }
}
